#ifndef WORKWINDOW_H
#define WORKWINDOW_H
#include <QString>
#include <QMainWindow>
#include <QTcpSocket>
#include <QHostAddress>
#include <QSqlDatabase>
#include <QDebug>
#include <QMessageBox>
#include <QSqlError>
#include <QSqlQuery>
#include <QVariantList>
#include <QSqlTableModel>
#include <QSqlRecord>
#include <QStringList>
namespace Ui {
class Workwindow;
}

class Workwindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit Workwindow(QWidget *parent = 0);
    void setUsername( QString str );
    void setIp( QString str );
    void connectTempDb( QString str );
    ~Workwindow();
signals:
    void on_destroyed_Signal();
private slots:
    void on_actionGlance_triggered();

    void on_actionAdd_triggered();

    void on_actionUserInfoModi_triggered();

    void on_pushButtonModinickname_clicked();

    void on_pushButton_4_clicked();

    void on_pushButtonAddAdd_clicked();

    void on_pushButtonCancel_clicked();

    void on_pushButton_3_clicked();

    void on_pushButtonDel_clicked();

    void on_pushButtonAddCommit_clicked();

    void on_comboBoxMonth_currentIndexChanged(const QString &arg1);

    void on_pushButton_5_clicked();

    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

private:
    Ui::Workwindow *ui;
    QString username;
    QTcpSocket *socketNickModi;
    QTcpSocket *socketPasswdModi;
    QTcpSocket *socketCommitTemp;
    QTcpSocket *socketGetOnedInfo;
    QTcpSocket *socketGetSearInfo;
    QTcpSocket *socketPriorInfo;
    QTcpSocket *socketNextInfo;
    QString  IP;
    QSqlTableModel *model;
    QStringList days;

};

#endif // WORKWINDOW_H
